rawset(_G, "RFW", {})

P_RandomRange(0, FU+1) //hide warnings about undefined range lol
//im too lazy to multiply by fixed ranges so I tend to just use P_RandomRange, since it now distributes FU amounts of possible values across the 2 end points instead of only going from 0-FU

local DMG_GENERIC = 0

RFW.ISLOADED = true //for character modders etc.

//gamedef shit, still entirely optional, just for mod compat
RFW.GAMENAME = "Rampage"
RFW.GAMEV = 0 //might change this later to be 0 since it might conflict with code that expects gamev to be a number
RFW.GAMESUBV = 6
RFW.GAMEVFULL = "Alpha 6"
//

//enginedef shit, still entirely optional, just for mod compat
RFW.RFWNAME = "rfw framework rampage indev version"
RFW.RFWV = 0
RFW.RFWSUBV = 3
RFW.RFWVFULL = "v0.3"
//

RFW.MHealth = 100 //default start health/max health
RFW.OHealth = 200 //default overheal health
RFW.MArmor = 200 //max armor
RFW.DefaultDamage = {1, 3} //default minimum and max damage for projectiles and enemies that don't have set damage values
RFW.DAMAGETABLE = { //min damage, max damage, should probably be a pretty low spread, since damage can be ANY number between these two, these are for projectiles ONLY
/*	[MT_TURRETLASER] = {15, 20},
	[MT_JETTBULLET] = {5, 15},
	[MT_REDRING] = {5, 15},
	[MT_THROWNBOUNCE] = {10, 20},
	[MT_THROWNINFINITY] = {10, 20},
	[MT_THROWNAUTOMATIC] = {5, 15},
	[MT_THROWNSCATTER] = {7, 21},
	[MT_THROWNEXPLOSION] = {20, 20},
	[MT_THROWNGRENADE] = {20, 20},*/
} //DAMAGETABLE is now a backup set, use mobjinfo[MT_*].rfwdamage and mobjinfo[MT_*].rfwmaxdamage for damage values
RFW.ACIDTABLE = {
	[DMG_GENERIC] = 1,
	[DMG_WATER] = 2,
	[DMG_FIRE] = 4,
	[DMG_ELECTRIC] = 2,
	[DMG_SPIKE] = 1,
	[DMG_NUKE] = -1, //negative one indicates we instakill the player
	[DMG_DEATHPIT] = -1, 
	[DMG_CRUSHED] = -1,
	[DMG_DROWNED] = -1,
	[DMG_SPACEDROWN] = -1,
	[DMG_INSTAKILL] = -1,
}
RFW.HEALITEMS = { //armor, amount, cap, protvalue
	[MT_RING_BOX] = {false, 25, 100},
	[MT_PITY_BOX] = {false, 25, 100},
	[MT_ATTRACT_BOX] = {true, 250, 250, 75},
	[MT_FORCE_BOX] = {true, 200, 200, 50},
	[MT_ARMAGEDDON_BOX] = {true, 250, 250, 75},
	[MT_WHIRLWIND_BOX] = {true, 100, 100, 25},
	[MT_ELEMENTAL_BOX] = {true, 100, 100, 25},
	[MT_1UP_BOX] = {false, 100, 200},
}
RFW.PAINCHANCE = {
}

RFW.SPECIALDAMAGEHOOK = {
}

RFW.DMGTIC = 7

RFW.restrictsecondcolor = CV_RegisterVar({
	name = "sv_restrictsecondcolor",
	defaultvalue = "False",
	PossibleValue = CV_TrueFalse,
	flags = CV_NETVAR
	//func = aimassistprintoutbrah
})

COM_AddCommand("mental", function(p)
	if not p.mo then return end
	S_StartSound(p.mo, sfx_BOYUWU)
	CONS_Printf(p, "I hate that fuckin cat.. - RDude")
end)

COM_AddCommand("spoonise", function(p)
	if not p.mo then return end
	S_StartSound(p.mo, sfx_RNSTFU)
end)